package com.cn.gxa.redisutils.bean;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

@Data
@NoArgsConstructor  //无参构造器
@AllArgsConstructor //全部参数的构造器
@Entity
@Table(name = "user")
public class User implements Serializable {


    private static final long serialVersionUID = -7452198053961244595L;//操作实体类就如同操作表

    @Id//主键
    @GeneratedValue(strategy = GenerationType.IDENTITY) //自动增长
    @Column(name = "id")//字段名
    private Integer no;
    @Column
    private String username;//alter
    @Column
    private String password;
    @Column
    private String nick;
    @Column
    private Date logintime;
    @Column
    private String auth;
    @Column
    private Date birthday;
/*
  public Date getBirthday() {
    return birthday;
  }

  public void setBirthday(Date birthday) {
    this.birthday = birthday;
  }

  public Integer getNo() {
    return no;
  }

  public void setNo(Integer no) {
    this.no = no;
  }


  public String getUsername() {
    return username;
  }

  public void setUsername(String username) {
    this.username = username;
  }


  public String getPassword() {
    return password;
  }

  public void setPassword(String password) {
    this.password = password;
  }


  public String getNick() {
    return nick;
  }

  public void setNick(String nick) {
    this.nick = nick;
  }


  public Date getLogintime() {
    return logintime;
  }

  public void setLogintime(Date logintime) {
    this.logintime = logintime;
  }


  public String getAuth() {
    return auth;
  }

  public void setAuth(String auth) {
    this.auth = auth;
  }


  @Override
  public String toString() {
    return "User{" +
            "no=" + no +
            ", username='" + username + '\'' +
            ", password='" + password + '\'' +
            ", nick='" + nick + '\'' +
            ", logintime=" + logintime +
            ", auth='" + auth + '\'' +
            ", birthday=" + birthday +
            '}';
  }*/
}
